SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 65574: Decimal values are rounded after they are inserted into a new Databricks table via SAS/ACCESS® Interface to JDBC

DetailsHotfixAboutRate It

When numeric decimal values are inserted into a Databricks table by using SAS/ACCESS Interface to JDBC, the inserted values might be rounded.

This issue occurs when any of the following are true:

  • You use a DATA step to create and load a new Databricks table.
  • You use either the SQL procedure or APPEND procedure to create and load a new Databricks table, and the numeric column has a non-date/time/datetime format.

The workaround is to create an empty table, ensuring that all non-date/time/datetime formats are removed from numeric columns. Then insert the data by using PROC SQL or PROC APPEND; an example of this workaround is shown below:

data sampleData ;
      /* Create some sample data. */
   UnFormatted_Number = 123.45; 
   Formatted_Number   = 123.45;
   format Formatted_Number 8.2;
   put UnFormatted_Number= Formatted_Number=;
run;

libname libref JDBC connection-options libname-options;

   /* Delete the Databricks table that you want to load. */
proc delete data=libref.test;
run;

   /* Create an empty Databricks table, removing any formats. */
data libref.test;
   set sampleData;
      /* List all numeric columns that have non-date/time/datetime formats. */
   format Formatted_Number;
   stop;
run;
 

   /* Use PROC APPEND or PROC SQL to load the table. */
proc append base=libref.test data=sampleData;
run;

proc sql;
   insert into libref.test select * from sampleData;
quit;

Click the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemBase SASMicrosoft Windows 8.1 Enterprise 32-bit9.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows 8.1 Enterprise x649.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows 8.1 Pro 32-bit9.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows 8.1 Pro x649.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows 109.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 Datacenter9.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 R2 Datacenter9.4_M69.4_M79.4 TS1M69.4 TS1M7
Windows 7 Professional 32 bit9.4_M69.4_M79.4 TS1M69.4 TS1M7
Windows 7 Home Premium x649.4_M69.4_M79.4 TS1M69.4 TS1M7
Windows 7 Home Premium 32 bit9.4_M69.4_M79.4 TS1M69.4 TS1M7
Windows 7 Enterprise x649.4_M69.4_M79.4 TS1M69.4 TS1M7
Windows 7 Enterprise 32 bit9.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows Server 20199.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows Server 20169.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows 8 Pro 32-bit9.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows 8 Pro x649.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft® Windows® for x649.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows 8 Enterprise 32-bit9.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows 8 Enterprise x649.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 Std9.4_M69.4_M79.4 TS1M69.4 TS1M7
Microsoft Windows Server 2012 R2 Std9.4_M69.4_M79.4 TS1M69.4 TS1M7
Windows 7 Professional x649.4_M69.4_M79.4 TS1M69.4 TS1M7
Windows 7 Ultimate 32 bit9.4_M69.4_M79.4 TS1M69.4 TS1M7
Windows 7 Ultimate x649.4_M69.4_M79.4 TS1M69.4 TS1M7
64-bit Enabled AIX9.4_M69.4_M79.4 TS1M69.4 TS1M7
64-bit Enabled Solaris9.4_M69.4_M79.4 TS1M69.4 TS1M7
HP-UX IPF9.4_M69.4_M79.4 TS1M69.4 TS1M7
Linux for x649.4_M69.4_M79.4 TS1M69.4 TS1M7
Solaris for x649.4_M69.4_M79.4 TS1M69.4 TS1M7
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.